﻿<%@ Page Title="Host Names" Language="C#" MasterPageFile="~/Administration/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Administration_Hosts_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPHMain" runat="Server">
    <asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1">
        <EmptyDataTemplate>
            <p>No host names are defined.</p>
            <p>
                <altairis:IconHyperLink ID="IconHyperLink1" runat="server" Icon="ServerAdd" Text="Create host name" NavigateUrl="Detail.aspx" CssClass="strong" />
            </p>
        </EmptyDataTemplate>
        <LayoutTemplate>
            <table class="grid">
                <thead>
                    <th>Host Name</th>
                    <th>Owner</th>
                    <th>Created</th>
                    <th style="width: 50px">Entries</th>
                </thead>
                <tbody>
                    <tr>
                        <td colspan="4" class="newitem">
                            <altairis:IconHyperLink ID="IconHyperLink1" runat="server" Icon="ServerAdd" Text="New host name" NavigateUrl="Detail.aspx" />
                        </td>
                    </tr>
                    <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <altairis:IconHyperLink ID="IconHyperLink2" runat="server" Icon="ServerEdit" Text='<%# Eval("HostName") %>' NavigateUrl='<%# Eval("HostId", "Detail.aspx?HostId={0}") %>' CssClass="strong" />
                </td>
                <td>
                    <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("UserName") %>' />
                </td>
                <td class="r">
                    <altairis:DateLabel ID="DateLabel1" runat="server" DateValue='<%# Eval("DateCreated") %>' />
                </td>
                <td class="r">
                    <asp:Literal ID="Literal2" runat="server" Text='<%# Eval("Entries.Count") %>' />
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="SwitchboardDataContext" OrderBy="HostName" TableName="Hosts"></asp:LinqDataSource>
</asp:Content>
